const { HotModuleReplacementPlugin } = require('webpack');

module.exports = {
  mode: 'development',
  devtool: 'cheap-module-source-map',
  target: 'web',
  devServer: {
    hot: true,
    port: 2021,
    open: true,
    historyApiFallback: true,
    compress: true // 压缩
  },
  plugins: [
    new HotModuleReplacementPlugin()
  ]
}